package com.milhouz.quizzdroid.bean;

import android.database.Cursor;

import com.milhouz.quizzdroid.db.QuizzDroidConstants;

public class Category {

	private int mId;
	private String mLabel;

	public Category(final Cursor cursor) {
		if (cursor != null && cursor.moveToFirst()) {
			mId = cursor.getInt(cursor.getColumnIndex(QuizzDroidConstants.ID));
			mLabel = cursor.getString(cursor.getColumnIndex(QuizzDroidConstants.COLUMN_NAME_LABEL));
		} else {
			// throw new IllegalArgumentException("Cursor is null");
		}
	}

	public int getId() {
		return mId;
	}

	public String getLabel() {
		return mLabel;
	}

}
